package com.archegos.pojo;
//代理角色，在这里面增加日志的实现
public class UserServiceProxy implements UserService{
    private UserServiceImpl userService;
    public void setUserService(UserServiceImpl userService){
        this.userService = userService;
    }

    @Override
    public void add() {
        log("add");
        userService.add();
    }

    @Override
    public void delele() {
        log("delele");
        userService.delele();
    }

    @Override
    public void updata() {
        log("updata");
        userService.updata();
    }

    @Override
    public void query() {
        log("query");
        userService.query();
    }
    public void log(String msg){
        System.out.println("执行了"+msg+"方法");
    }
}
